import request from '@/utils/request'

// 查询员工列表
export function listEmployee(query) {
    return request({
      url: '/employees/employee/list',
      method: 'get',
      params: query
    })
  }
  
  // 查询员工详细
  export function getEmployee(id) {
    return request({
      url: '/employees/employee/detail/' + id,
      method: 'get'
    })
  }
  
  // 新增员工
  export function addEmployee(data) {
    return request({
      url: '/employees/employee/add',
      method: 'post',
      data: data
    })
  }
  
  // 修改员工
  export function updateEmployee(data) {
    return request({
      url: '/employees/employee/update',
      method: 'put',
      data: data
    })
  }
  
  // 删除员工
  export function deleteById(id) {
    return request({
      url: '/employees/employee/deleteById/' + id,
      method: 'delete'
    })
  }
  
  // 批量删除
  export function deleteByIds(ids) {
    return request({
      url: '/employees/employee/deleteByIds/' + ids,
      method: 'delete'
    })
  }